package com.jizhi.springboot.common;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**   
* @Description: 拦截器装配
* @author 白海安 （baihaian@126.com） 2018年7月9日 上午9:40:40
* @version V1.0   
*/
@SpringBootConfiguration
public class ConfigurerAdapter extends WebMvcConfigurerAdapter	{
	
	@Autowired
	private CheckInterceptor checkInterceptor;

	@Override
	public void addInterceptors(InterceptorRegistry registry) {
		registry.addInterceptor(checkInterceptor).addPathPatterns("/**");
	}
}
